<p>
Hello, <%= session['user'].first_name %> <%= session['user'].last_name %> 
you are logged in as <%= session['user'].login %>!
</p>
<p>
	You are member of the <%= session['user'].group.name %> group. <br/>
	<% if((session['user'].rights & 1) > 0) %>
		You are allowed to take exams. </br>
	<% end %>
	<% if((session['user'].rights & 2) > 0) %>
		You are allowed to create and modify exams. </br>
	<% end %>
	<% if((session['user'].rights & 4) > 0) %>
		You are allowed to create and modify groups and users. </br>
	<% end %>
</p>
<% if((session['user'].rights & 2) > 0) -%>
<p>
	You have currently 
	<%= a = Activation.find_by_sql('select count(*) as number from ' \
								 'activations where exam_id in ' \
								 '(select id from exams where user_id = \'' +
										session['user'].id.to_s + '\') ' \
								 'and NOW() between start and end') 
	a[0].number
	%>
	active Exams
</p>
<% end %>
